package com.example.interfaces.dto;

import com.example.infrastructure.excel.ExcelExportable;
import com.example.infrastructure.excel.ExcelImportable;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.*;

/**
 * 问诊消息表 DTO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@Schema(name = "ConsultationMessagesDTO", description = "问诊消息表DTO")
public class ConsultationMessagesDTO implements ExcelExportable, ExcelImportable {

    @Schema(description = "问诊ID")
    @ExcelProperty("问诊ID")
    @NotNull(message = "问诊ID不能为空")
    private Long consultationId;
    
    @Schema(description = "发送者类型：1患者，2医生")
    @ExcelProperty("发送者类型：1患者，2医生")
    private Byte senderType;
    
    @Schema(description = "发送者ID")
    @ExcelProperty("发送者ID")
    @NotNull(message = "发送者ID不能为空")
    private Long senderId;
    
    @Schema(description = "消息内容")
    @ExcelProperty("消息内容")
    @NotBlank(message = "消息内容不能为空")
    private String content;
    
    @Schema(description = "消息类型：1文本，2图片，3语音，4视频")
    @ExcelProperty("消息类型：1文本，2图片，3语音，4视频")
    private Byte msgType;
    
    @Schema(description = "文件URL")
    @ExcelProperty("文件URL")
    @NotBlank(message = "文件URL不能为空")
    private String fileUrl;
    
    @Schema(description = "文件大小")
    @ExcelProperty("文件大小")
    @NotNull(message = "文件大小不能为空")
    private Long fileSize;
    
    @Schema(description = "语音/视频时长(秒)")
    @ExcelProperty("语音/视频时长(秒)")
    @NotNull(message = "语音/视频时长(秒)不能为空")
    private Integer duration;
    
    @Schema(description = "是否已读：0未读，1已读")
    @ExcelProperty("是否已读：0未读，1已读")
    private Byte isRead;
    
    @Schema(description = "租户编号")
    @ExcelProperty("租户编号")
    @NotNull(message = "租户编号不能为空")
    private Long tenantId;
    
}
